window.onload = () => {
	var selectEle = document.querySelector('#groupName');
	ajax({
		method : 'GET',
		url : '/officalWebsite/info/signUp?method=searchGroupsName',
		data : {
			nowTime : new Date().getTime()
		},
		success : function(data){
			var arrName = eval('('+data+')');
			clearOption();
			for(var i=0;i<arrName.length;i++){
				selectEle.innerHTML += '<option value="'+arrName[i]+'">'+arrName[i]+'</option>';
			}
		}
	});
	function clearOption(){
		var selectEle = document.querySelector('#groupName');
		var options = selectEle.children;	
		if(options!=null){
			var arr = [];
			for(var i=0;i<options.length;i++){
				arr.push(options[i]);
			}
			for(var i=0;i<arr.length;i++){
				selectEle.removeChild(arr[i]);
			}
		}
	}
}